#define _CRT_SECURE_NO_WARNINGS 1
class Solution {
public:

    vector<vector<int>> vv;
    vector<int> v;
    void bfs(vector<int>& nums, int num)
    {
        vv.push_back(v);
        for (int i = num; i < nums.size(); i++)
        {
            v.push_back(nums[i]);
            bfs(nums, i + 1);
            v.pop_back();
        }
    }
    vector<vector<int>> subsets(vector<int>& nums) {
        bfs(nums, 0);
        return vv;
    }
};